namespace TaskKernel.Domain.Services.Permission
{
    public class ExecutorOwnerClosedEditF : IPermission<TaskPermissions>
    {
        #region IPermission<TaskPermissions> Members

        public Permissions GetPermissions(TaskPermissions app)
        {
            if (((app.Role == RoleEnum.Executor) || (app.Role == RoleEnum.Owner)) && (app.Task.IsClosed()))
                return new PermissionsOwnerClosedTaskEditPage();
            return new Permissions();
        }

        #endregion
    }
}